package com.gxa.uhome.service.impl;

import com.gxa.uhome.mapper.MaterialMapper;
import com.gxa.uhome.pojo.Material;
import com.gxa.uhome.service.MaterialService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Author: XHZ
 * @Date: 10:48 2021/6/8
 */
@Service
public class MaterialServiceImpl implements MaterialService {
    @Resource
    MaterialMapper materialMapper;

    @Override
    public Integer insert(Material material) {
        return materialMapper.insert(material);
    }

    @Override
    public List<Material> selectLikeByPage(String name, String stationName, Integer offset, Integer size) {
        return materialMapper.selectLikeByPage(name, stationName, offset, size);
    }

    @Override
    public List<Material> selectByPage(String stationName, Integer offset, Integer size) {
        return materialMapper.selectByPage(stationName, offset, size);
    }

    @Override
    public Integer deleteByName(String name) {
        return materialMapper.deleteByName(name);
    }

    @Override
    public Integer update(Material material) {
        return materialMapper.update(material);
    }
}
